﻿<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <!-- Adds a Ribbon custom action to a list in the host web site. -->
  <!-- Create a new custom list and add a new item to it -->
  <!-- RegistrationId attribute is the list type id,
        in this case, a read mark list (id=10057). -->
  <CustomAction Id="75dd24d9-0c16-4ef5-be0a-f52ed0e620fa.CustomAction"
              RegistrationType="List"
              RegistrationId="10057"
              Location="CommandUI.Ribbon"
              Sequence="10001"
              Title="UnReadRibbon">
    <CommandUIExtension>
      <CommandUIDefinitions>
        <CommandUIDefinition Location="Ribbon.ListItem.Manage.Controls._children">
          <Button
              Id="Ribbon.Library.Connect.PropertyViewer"
              Alt="Invoke custom action"
              Sequence="115"
              Command="Invoke_CustomAction"
              LabelText="UnReadRibbon"
              TemplateAlias="o1"
              Image32by32="_layouts/15/images/placeholder32x32.png"
              Image16by16="_layouts/15/images/placeholder16x16.png" />
        </CommandUIDefinition>
      </CommandUIDefinitions>
      <CommandUIHandlers>
        <CommandUIHandler
            Command="Invoke_CustomAction"
            CommandAction="javascript:ClickUnReadRibbonButton()"
            EnabledScript ="javascript:EnableUnRead()"/>           
      </CommandUIHandlers>
    </CommandUIExtension>
  </CustomAction>
  <CustomAction
    Id="Ribbon.ListItem.Manage.ReadMarkAction"
    Location="ScriptLink"
    ScriptSrc ="~site/_layouts/15/ReadMark/ReadMarkAction.js"/>

</Elements>

